package com.gtw.modules.api.service;

import com.gtw.modules.entity.TbGroupbuyUser;

import java.util.List;
import java.util.Map;

/**
 * Created by wuye on 2018/3/15.
 */
public interface TbGroupbuyUserService {

    int deleteByPrimaryKey(Integer id);

    int insert(TbGroupbuyUser record);

    int insertSelective(TbGroupbuyUser record);

    TbGroupbuyUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbGroupbuyUser record);

    int updateByPrimaryKey(TbGroupbuyUser record);

    /**
     * 根据用户查询团购信息
     * @param
     * @return
     */
    List<TbGroupbuyUser> queryByUserId(Map<String, Object> map);
    int queryTotal(Map<String, Object> map);


    /**
     * 根据活动查询
     */
    List<TbGroupbuyUser> queryByGroupId(Integer groupid);

    /**
     * 根据用户ID查询用户参与的团购
     */
    List<TbGroupbuyUser> queryByuserid(Integer userid);

    /**
     * 判断用户是否发起过这个团购
     */
    List<TbGroupbuyUser> foundByUserid(Integer userid);

    /**
     * 根据团购id 查找团长
     * @return
     */
    List<TbGroupbuyUser> queryByLeader(Integer groupbuyid);


    List<TbGroupbuyUser> queryByAllLeader();


    List<TbGroupbuyUser> queryByTeam(Map<String, Object> map);


}
